package org.flexspeedup.blog.events
{
import flash.events.Event;
/**
 * Fetches a page of projects
 */
public class GetProjectsEvent extends Event
{
    //--------------------------------------------------------------------------
    //
    //  Class Properties
    //
    //--------------------------------------------------------------------------

    //--------------------------
    // ID
    //--------------------------
    /**
     * Unique id for this event.
     */
    public static const ID:String = "GetProjectsEvent";
    
    //--------------------------------------------------------------------------
    //
    // Constructor
    //
    //--------------------------------------------------------------------------

    /**
     * Creates a new instance of the <code>GetProjectsEvent</code> event 
     */    
    public function GetProjectsEvent(page:int = 1, pageSize:int = 10)
    {
        super(ID, true, true);
        _page = page;
        _pageSize = pageSize;
    }

    //--------------------------------------------------------------------------
    //
    //  Properties
    //
    //--------------------------------------------------------------------------

    //--------------------------------------------------------------------------
    //
    //  Properties
    //
    //--------------------------------------------------------------------------

    //----------------------------------
    //  page
    //----------------------------------
    /**
     *  @private
     */
    private var _page:int;

    /**
     * the page to get
     */
    public function get page():int
    {
        return _page;
    }

    //----------------------------------
    //  pageSize
    //----------------------------------

    /**
     *  @private
     */
    private var _pageSize:int;

    /**
     * the page size
     */
    public function get pageSize():int
    {
        return _pageSize;
    }
    
    //--------------------------------------------------------------------------
    //
    //  Overridden Methods - Event
    //
    //--------------------------------------------------------------------------

    /**
     * @inheritdoc flash.events.Event#clone
     */
    override public function clone():Event
    {
        return new GetProjectsEvent(page, pageSize);
    }
}
}